﻿namespace 抽象方法
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, World!");
        }
    }


    internal abstract class Base {

        public abstract void Func1();
    
    }


    internal class Child : Base
    {
        public override void Func1()
        {
            Console.WriteLine("继承抽象类，抽象方法必须实现");
        }
    }

    internal interface IBase
    {
        void Func1();
        void Func2();
    }



    /// <summary>
    /// 接口的实现类需要实现接口中的所有方法
    /// </summary>
    internal class Child2 : IBase
    {
        public void Func1()
        {
            throw new NotImplementedException();
        }

        public void Func2()
        {
            throw new NotImplementedException();
        }
    }
}
